home *** CD-ROM | disk | FTP | other *** search
- Path: engnews1.Eng.Sun.COM!taumet!clamage
- From: willer@carolian.com (Steve Willer)
- Newsgroups: comp.std.c++
- Subject: A couple of questions about strings
- Date: 20 Mar 1996 22:11:25 GMT
- Organization: Carolian Systems, Toronto ON
- Sender: news@sq.com (News Administrator)
- Approved: clamage@eng.sun.com (comp.std.c++)
- Message-ID: <3150756f.168603020@sqarc.sq.com>
- NNTP-Posting-Host: taumet.eng.sun.com
- X-Newsreader: Forte Agent .99d/32.182
- Originator: clamage@taumet
-
- I'm probably beating a dead horse here, but I had a couple of
- questions about the strings class (at least, the one in the April WP).
- Specifically, there are two design decisions that I don't understand.
-
- a) Why does basic_string::copy() not also copy an ending '\0'? If
- there's some sort of good reason, why wasn't a function added that did
- this (perhaps basic_string::copy_null() or something)? I must say, it
- is very inconvenient to copy a string to a C-style array of chars with
- the current string class.
-
- b) I don't see any reason why basic_string::copy() is not a const
- function. Any particular reason for that one?
-
-
-
- [ comp.std.c++ is moderated. To submit articles: try just posting with ]
- [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
- [ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
- [ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
- [ Comments? mailto:std-c++-request@ncar.ucar.edu ]
-